﻿@using WSS.Models.Hosp
@{
    ViewBag.Title = "Home";
    int foreachidx = 0;
}

@section css
{
    <style type="text/css">
        .row
        {
            margin-bottom: 20px;
            height: 100px;
        }

            .row div span
            {
                font-size: 16px;
            }

            .row div a
            {
                font: normal bold 16px/100px microsoft yahei;
            }

        .bg01
        {
            background-color: #ffefd5;
        }

        .bg02
        {
            background-color: #ffefd5;
        }

        .bg03
        {
            background-color: #e6e6fa;
        }
    </style>
}
<div class="container" id="contentid">
</div>

<div id="hid_add_form" class="hide" style="text-align: center">
    <form>
        <label>
            医院名称：
          <input type="text" id="hosp_name" />
        </label>
    </form>
</div>

@section script
{
    <script>
        $(function () {

            load_hosptial();

        });

        function load_hosptial(parameters) {
            $("#contentid").load("/usercenter/get_hosiptal_content");
        }

        function add() {
            var html = $("#hid_add_form").addClass("show").removeClass("hide");
            mainfn.dialog("添加医院", html, save);
        }

        function save() {
            $.post("/hospital/add", { HOSP_NAME: $("#hosp_name").val() }, function (msg) {
                msg.flag && load_hosptial();
            });
        }

    </script>
}
